const express = require('express');
const router = express.Router();
const service = require('./service');

router.get('/books', service.showAll);
router.post('/books', service.addData);
router.get('/books/book/:name', service.checkName);
router.get('/books/:id', service.toEditBook);
router.put('/books/:id', service.editBook);
router.delete('/books/:id', service.deleteBook);
module.exports = router;